HAL DCMI migration: List of applicable concepts ¶
This section provides information about the HAL DCMI applicable architecture concepts.
Concepts for DCMI ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into separate init and config steps:
|
|
|
Removal and conversion of init structure to configuration structure |
The legacy init structure has been removed. Configuration is expressed through typed structs passed to feature-specific APIs. |
|
The handle structure has been renamed to
|
|
|
The structure
|
|
|
The functions
|
|
|
New APIs have been introduced to get and set DCMI features. |
|
|
DMA configuration and linking are explicit using DCMI APIs:
|
|
|
Two functions are available to set and get user data:
|
|
|
Individual callback registration APIs replace global register and unregister functions |
Specific functions manage callback registration for each DCMI event, enabling the registration of callback functions for various DCMI events. |
|
A single IRQ handler forwards events, applications implement per-event callbacks for processing. |
|
|
The DCMI state machine is reworked to ensure transitions of the peripheral functional states. |
|
|
Update DCMI functions to return:
|
|
|
Redesign the error handling mechanisms within the HAL to enhance error detection, reporting, and management. This update aims to provide more detailed and consistent error information. |
|
|
New APIs for filtering optional asynchronous process interrupts |
New HAL DCMI start APIs with interrupt filtering capability, such as
|
|
All underscore prefixes in DCMI driver have been removed. |
|
|
All TypeDef parts of the HAL DCMI driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The
|
|
|
Merge HAL extension files with common ones and remove the EX prefix from APIs. |
Only one HAL DCMI header file may be available; macros, defines, functions, etc., in extension headers are adapted and merged into the main header. |
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including DCMI instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL DCMI APIs start with
|
Other HAL DCMI changes ¶
|
Concept |
Consideration |
|---|---|
|
Provide pipe concept. |
To align with the DCMIPP HAL driver, which authorizes multiple capture pipes and to harmonize the HAL DCMI and HAL DCMIPP APIs, a pipe parameter was added to various capture APIs. This facilitates migration from peripherals using DCMI to those using DCMIPP. Note that the DCMI peripheral supports only one pipe, pipe 0. |